package pATT.profilingAlgorithm.PersonalSearcher;

import java.util.Enumeration;
import java.util.Hashtable;



public class InstanceSet {

	Hashtable instances;
	
	public InstanceSet(){
		instances = new Hashtable(); 
	} 

	@SuppressWarnings("unchecked")
	public void addInstance(Instance i){
		instances.put(i.getID(),i);
	} 

	public void removeInstance(String key){
		instances.remove(key);
	} 

	public Instance getInstance(String k){
		return (Instance)instances.get(k);		
	} 

	public Enumeration getEnumeration(){
		return instances.keys();		
	} 

	public int size(){
		return instances.size();
	}

	public String toString(){
		return instances.toString();
	}
}
